//
//  LotteryModel.m
//  Cai8
//
//  Created by zhoubo on 2017/6/19.
//  Copyright © 2017年 zhoubo. All rights reserved.
//

#import "LotteryModel11.h"

@implementation LotteryModel11
+(NSArray *)getModels
{
    NSArray* imgnames = @[@"bb1",@"bb2",@"bb3",@"bb4",@"bb5"];
    NSArray* names = @[NSLocalizedString(@"双色球", @"双色球"),NSLocalizedString(@"大乐透",nil),NSLocalizedString(@"排列三", nil), NSLocalizedString(@"排列五",nil) ,NSLocalizedString(@"快三",nil)];
    
    NSMutableArray* arr = [[NSMutableArray alloc]initWithCapacity:5 ];
    
    for (int i = 0; i<5; ++i) {
        
        LotteryModel11 * model = [[LotteryModel11 alloc]init];

        model.imgname = imgnames[i];
        model.name = names[i];
        model.value = [NSString stringWithFormat:@"%d",arc4random_uniform(5) + 4];
        
        int g = model.value.intValue;
        
        do {
            [model.apple appendString:@""];
        } while (--g);

        
        
        [arr addObject:model];
        
        
    }
    return  arr;
}

-(NSString *)description
{
    return [NSString stringWithFormat:@"imgname : %@,name:%@, value:%@",self.imgname,self.name,self.value];
}

-(NSMutableString *)apple
{
    if (_apple == nil) {
        _apple = [[NSMutableString alloc]initWithCapacity:9];
    }
    return _apple;
}

@end
